import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/v2/backend/resource/list',
    method: 'get',
    params: { page: query.page - 1, size: query.size }
  })
}

export function fetchListCount(query) {
  return request({
    url: '/v2/backend/resource/count',
    method: 'get',
    params: query
  })
}

export function checkResource(resourceId, resourceState) {
  return request({
    url: '/v2/backend/resource/check?resourceId=' + resourceId + '&resourceState=' + resourceState,
    method: 'get'
  })
}
